package com.tree.rpc.netty.consumer;

import com.tree.rpc.netty.api.IRpcCalc;
import com.tree.rpc.netty.api.IRpcHello;
import com.tree.rpc.netty.consumer.proxy.RpcProxy;

/**
 * @ClassName com.tree.rpc.netty.consumer
 * Description: <类功能描述>. <br>
 * <p>
 * <使用说明>
 * </p>
 * @Author tree
 * @Date 2019-11-06 21:04
 * @Version 1.0
 */
public class RpcConsumer {

    public static void main(String[] args) {


        IRpcHello hello = RpcProxy.create(IRpcHello.class);
        System.out.println("======="+hello.hello("tree"));
        int a = 8; int b = 2;
        IRpcCalc rpcCalc = RpcProxy.create(IRpcCalc.class);
        System.out.println(a+" + " +b + " = " + rpcCalc.add(a,b));
        System.out.println(a+" - " +b + " = " + rpcCalc.sub(a,b));
        System.out.println(a+" * " +b + " = " + rpcCalc.mult(a,b));
        System.out.println(a+" / " +b + " = " + rpcCalc.div(a,b));
    }
}
